home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Franz PD / Franz PD Disk #306 (1994)(Rhein-Sieg-Soft).zip / Franz PD Disk #306 (1994)(Rhein-Sieg-Soft).adf / mand2000 / arexx / PrintCommands.mnd2 < prev    next >
Text File  |  1993-09-12  |  2KB  |  59 lines

  1. /* This script is supplied with the Mand2000 demo and release */
  2. /* versions and may be freely distributed. */
  3. /* Copyright 1993 Cygnus Software. */
  4.  
  5. /* Print the available commands of the current project, or the */
  6. /* entire program.  Pass 'project' or 'global' as a parameter. */
  7. /* Default is global. */
  8.  
  9. /* Typically this command is run from the menus which are */
  10. /* installed by the default startup.mnd2 script. */
  11.  
  12. portname = address()    /* Retrieve the current port name. */
  13. /* If the portname does not start with MAND2000 then this script must */
  14. /* have been run with rx, rather than from Mand2000.  Therefore we */
  15. /* need to set the port name.  We do not always set the port name */
  16. /* because it is better to let Mand2000 set it for us, so that */
  17. /* this script can be used with windows other than the one with */
  18. /* port name MAND2000.1. */
  19. if (left(portname, 8) ~= "MAND2000") THEN
  20.     address 'MAND2000.1'
  21.  
  22. options results
  23.  
  24. say
  25.  
  26. /* Get the argument passed to this script. */
  27. parse arg command
  28.  
  29. command = upper(command)    /* Make sure the command is in upper case. */
  30.  
  31. if (command = PROJECT) THEN DO
  32.     say "   Project commands are:"
  33.     /* Ask for the list of available commands. */
  34.     help
  35.     CommandList = result
  36.     numcommands = Words(CommandList)
  37.     /* Ask for help on all commands. */
  38.     do command = 1 to numcommands
  39.         Word(CommandList, command) "?"
  40.         say result
  41.         END
  42.     END
  43. ELSE DO
  44.     address MAND2000
  45.  
  46.     say "   Global commands are:"
  47.     /* Ask for the list of available commands. */
  48.     help
  49.     CommandList = result
  50.     numcommands = Words(CommandList)
  51.     /* Ask for help on all commands. */
  52.     do command = 1 to numcommands
  53.         Word(CommandList, command) "?"
  54.         say result
  55.         END
  56.     END
  57.  
  58. exit
  59.